Overview

The data revealed that of the data collected, coral bleaching began in 1973. Data collection and ended in 2011. 50% of the bleached coral data was collected between 1998 and 2004. The average year for coral with a bleached severity code greater than 0 is 2001. The average severity code of the data is 0.8992.

library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.2
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0      ✔ purrr   0.3.4 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.3      ✔ forcats 0.5.2
## Warning: package 'ggplot2' was built under R version 4.2.2
## Warning: package 'dplyr' was built under R version 4.2.2
## Warning: package 'stringr' was built under R version 4.2.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(dplyr)
library(tidyr)
library(readr)
coral_data <- read_csv("https://raw.githubusercontent.com/info201b-au2022/project-group-28/main/data/CoralBleaching.csv")
## Rows: 6190 Columns: 28
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (19): REGION, SUBREGION, COUNTRY, LOCATION, DEPTH, BLEACHING_SEVERITY, C...
## dbl  (9): ID, LAT, LON, MONTH, YEAR, SEVERITY_CODE, MORTALITY_CODE, RECOVERY...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
table <- coral_data %>% 
  select(COUNTRY, CORAL_SPECIES, BLEACHING_SEVERITY, WATER_TEMPERATURE, OTHER_FACTORS) %>% 
  group_by(COUNTRY) %>% 
  filter(CORAL_SPECIES == "Acropora"| CORAL_SPECIES == "Montipora"|
           CORAL_SPECIES == "Pocillopora"| CORAL_SPECIES == "Porites") 

tab <- table(table)
View(tab)

This table shows the necessary elements and value we used to create our visualizations and answer our research questions. The table includes the information on four main species of corals. It includes the location, bleaching level, and factors to the corals’ bleaching.

#Chart 1
library(tidyverse)
library(dplyr)
library(tidyr)
library("ggplot2") 

name = c("Acropora", "Montipora", "Pocillopora", "Porites")
Reef_Size = c("small (< 10 cm)", "medium (10-50 cm)", "large (> 50 cm)") 
value = c(56, 12, 5, 3, 50, 22, 11, 1, 55, 12, 48, 0)
corals <- data.frame(name, Reef_Size, value, stringsAsFactors = FALSE) 
ggplot(data = corals, aes(x = name, y = value, fill = Reef_Size)) + 
  geom_bar(stat = "identity", position = "dodge") +
  labs(title = "Coral Species vs Bleaching Susceptibility", 
       x = "Coral Species", 
       y = "Bleaching Susceptibilty (percentage)")

The chart I included displays what kind of coral species are most susceptible to coral bleaching. This bar graph shows four of the most common coral species and their resistance to bleaching based on their coral reef size. We can see that the most susceptible species corals are Acropora and the most resistant are the Porites species.

#Chart 2
#install.packages(c("sf", "mapview"))
library(tidyverse)
library(sf)
## Warning: package 'sf' was built under R version 4.2.2
## Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
library(mapview)
## Warning: package 'mapview' was built under R version 4.2.2
library(readr)
coral_data <- read_csv("https://raw.githubusercontent.com/info201b-au2022/project-group-28/main/data/CoralBleaching.csv")
## Rows: 6190 Columns: 28
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (19): REGION, SUBREGION, COUNTRY, LOCATION, DEPTH, BLEACHING_SEVERITY, C...
## dbl  (9): ID, LAT, LON, MONTH, YEAR, SEVERITY_CODE, MORTALITY_CODE, RECOVERY...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
filtered_coral_data <- filter(coral_data, SEVERITY_CODE > 0)
mapview(filtered_coral_data, xcol = "LON", ycol = "LAT", crs = 4269, 
        grid = FALSE)

This map shows the longitude and latitude of all the locations where coral bleaching has a severity code greater than 0 in this data set. As the map shows, coral bleaching affects coral reefs all over the world. It is not just concentrated to one area. The data points appear to be more concentrated north of Australia and between North America and South America. This is also where a larger number of coral reefs are located. This is helpful to understand that coral bleaching does not necessarily have any correlation with a particular region of the world.

#Chart 3
library(tidyverse)
library("ggplot2")

severe_coral_bleaching_events <- read.csv("https://raw.githubusercontent.com/info201b-au2022/project-group-28/main/data/coral-bleaching-events.csv")

ggplot(severe_coral_bleaching_events, aes(x=Year, y=Severe.bleaching.events...30..bleached., color=Entity)) +
  geom_point() +
  labs(title = "Severe Coral Bleaching Events Over Time",
       x = "Year",
       y = "Number of Severe Bleaching Events >30% Bleached")

This data visualization shows a general timeline of severe coral bleaching events from the year 1930 to 2016, and is organized by general location, which in this case is the ocean’s region. The x-axis shows the change in time, while the y-axis shows the number of severe bleaching events that occurred that year. The data points are organized by location, with a different color representing each region. Overall, Australasia has the most frequent severe coral bleaching events with the exception of the World category.